<script setup name="Index">
import useLoginUserStore from "@/store/modules/user.js";
import ContractNotifyMessageList from "@/views/contract/home/notifyMessageList.vue";
import DocumentNotifyMessageList from "@/views/document/home/notifyMessageList.vue";
import ContactUs from "@/views/home/contactUs.vue";
import Seal from "@/views/home/seal.vue";
import useAppStore from "@/store/modules/app.js";

const device = computed(() => useAppStore().device);

const permissions = useLoginUserStore().permissions
const isContainsSystem = ref(permissions.indexOf("system") >= 0)
const isContainsContract = ref(permissions.indexOf("contract") >= 0)
const isContainsDocument = ref(permissions.indexOf("document") >= 0)
</script>

<template>
  <div class="app-container">
    <el-row :gutter="10">
      <el-col :span="24">
        <ContactUs/>
      </el-col>
    </el-row>
    <el-row :gutter="10" class="mt10" v-if="isContainsSystem">
      <el-col :span="24">
        <Seal />
      </el-col>
    </el-row>
    <el-row :gutter="10" class="mt10">
      <el-col :span="12" :xs="24" v-if="isContainsContract">
        <ContractNotifyMessageList title="合同管理"/>
      </el-col>
      <el-col :span="12" :xs="24" :class="{'mt10': device === 'mobile'}" v-if="isContainsDocument">
        <DocumentNotifyMessageList title="公文管理"/>
      </el-col>
    </el-row>
  </div>
</template>


